package decompileDemo;

import java.util.Date;

public class ClassLoaderTest {
    public static void main(String[] args) throws Exception {
        Hello hello = new Hello();
        System.out.println(hello.getClass().getClassLoader());
        System.out.println(hello.toString());

        System.out.println();
        Class c = new MyClassLoader("E:\\mycode\\Arithmetic\\lib").loadClass("Hello");
        Date d = (Date) c.newInstance();
        System.out.println(c.getClassLoader());
        System.out.println(d.toString());

        System.out.println();
        Class clazz = new MyClassLoader("E:\\mycode\\Arithmetic\\classes\\production\\Arithmetic\\decompileDemo").loadClass("Hello");
        Date date = (Date) clazz.newInstance();
        System.out.println(clazz.getClassLoader());
        System.out.println(date.toString());
    }
}
